#pragma ident "$Id: ClockConstraintForPCE.hpp $"

/**
 * @file ClockConstraintForPCE.hpp
 * Extended Kalman Filter process of ClockConstraint for PCE.
 */

#ifndef CLOCKCONSTRAINT_FOR_PCE_HPP
#define CLOCKCONSTRAINT_FOR_PCE_HPP

#include "ProcessingClass.hpp"
#include "SolutionStoreForPCE.hpp"
#include "CommonHeader.hpp"

namespace gpstk
{

    /** @addtogroup GPSsolutions */
    /// @ingroup math

    //@{

    class ClockConstraintForPCE : public ProcessingClass
    {
    public:

        /// Default constructor.
        ClockConstraintForPCE() {};


        /** Return a reference to a gnssRinex object after solving
         *  the previously defined equation system.
         *
         * @param gData    Data object holding the data.
         */
        virtual void Process(commonHeader& comHeader, gnssRinex& gData )
            noexcept(false)
        {};


        /** Return a reference to a sourceRinex object after solving
         *  the previously defined equation system.
         *
         * @param gData    Data object holding the data.
         */
        virtual void Process(commonHeader& comHeader, sourceRinex& gData )
            noexcept(false);


        /// Set Solution Store.
        ClockConstraintForPCE& setSolutionStore(SolutionStoreForPCE& solStore)
        { pSolStore = &solStore; return (*this); }


        /// Return a string identifying this object.
        virtual std::string getClassName(void) const;


        /// Destructor.
        virtual ~ClockConstraintForPCE() {};


    protected:

        /// Solution Store
        SolutionStoreForPCE* pSolStore;

        CommonTime time;

        int numUnknown;

        SourceIDSet sourceSet;
        SatIDSet satSet;

        Vector<double> state;
        Matrix<double> covar;

        SourceIntMap sourceIndex;
        SatIntMap satIndex;
        SourceSatIntMap ambiIndex;

    }; // End of class 'ClockConstraintForPCE'

    //@}

}  // End of namespace gpstk

#endif   // CLOCKCONSTRAINT_FOR_PCE_HPP
